<?php
namespace Product\Model\Entity;

use Zend\InputFilter\Factory as InputFactory;     // <-- Add this import
use Zend\InputFilter\InputFilter;                 // <-- Add this import
use Zend\InputFilter\InputFilterAwareInterface;   // <-- Add this import
use Zend\InputFilter\InputFilterInterface;        // <-- Add this import

class Product implements InputFilterAwareInterface
{
    public $id;
	public $name;
    public $description;
    public $quantity;
    public $type;
    public $pricefrequency;
    public $ownedsecurableitem_id;
    public $account_id;
    public $contact_id;
    public $opportunity_id;
    public $producttemplate_id;
    public $stage_customfield_id;
    public $sellprice_currencyvalue_id;

    public function exchangeArray($data)
    {
        //$this->id     = (isset($data['id'])) ? $data['id'] : null;
        $this->name = (isset($data['name'])) ? $data['name'] : null;
        $this->description  = (isset($data['description'])) ? $data['description'] : null;
		$this->quantity  = (isset($data['quantity'])) ? $data['quantity'] : null;
		$this->type  = (isset($data['type'])) ? $data['type'] : null;
		$this->pricefrequency  = (isset($data['pricefrequency'])) ? $data['pricefrequency'] : null;
		$this->ownedsecurableitem_id  = (isset($data['ownedsecurableitem_id'])) ? $data['ownedsecurableitem_id'] : null;
		$this->account_id  = (isset($data['account_id'])) ? $data['account_id'] : null;
		$this->contact_id  = (isset($data['contact_id'])) ? $data['contact_id'] : null;
		$this->opportunity_id  = (isset($data['opportunity_id'])) ? $data['opportunity_id'] : null;
		$this->producttemplate_id  = (isset($data['producttemplate_id'])) ? $data['producttemplate_id'] : null;
		$this->stage_customfield_id  = (isset($data['stage_customfield_id'])) ? $data['stage_customfield_id'] : null;
		$this->sellprice_currencyvalue_id  = (isset($data['sellprice_currencyvalue_id'])) ? $data['sellprice_currencyvalue_id'] : null;	
    }
    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
	
	protected $inputFilter; 
    
    public function setInputFilter(InputFilterInterface $inputFilter) 
    { 
        throw new \Exception("Not used"); 
    } 
    
    public function getInputFilter() 
    { 
        if (!$this->inputFilter) 
        { 
            $inputFilter = new InputFilter(); 
            $factory = new InputFactory(); 
            
        
        $inputFilter->add($factory->createInput(array(
            'name' => 'name', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
           
        ))); 
 
        $inputFilter->add($factory->createInput(array(
            'name' => 'description', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'quantity', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
 
		$inputFilter->add($factory->createInput(array(
            'name' => 'type', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'pricefrequency', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
        
		$inputFilter->add($factory->createInput(array(
            'name' => 'ownedsecurableitem_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 

		$inputFilter->add($factory->createInput(array(
            'name' => 'account_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        )));
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'contact_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'opportunity_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
             
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'producttemplate_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'stage_customfield_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
             
        ))); 
		
		$inputFilter->add($factory->createInput(array(
            'name' => 'sellprice_currencyvalue_id', 
            'required' => true, 
            'filters' => array( 
                array('name' => 'StripTags'), 
                array('name' => 'StringTrim'), 
            ), 
            
        ))); 
        $this->inputFilter = $inputFilter;
        }

        return $this->inputFilter;
	}

    
    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
        return $this;
    }

    public function getName() {
        return $this->name;
    }

    public function setName($name) {
        $this->name = $name;
        return $this;
    }

    public function getDescription() {
        return $this->description;
    }

    public function setDescription($description) {
        $this->description = $description;
        return $this;
    }
	public function getQuantity() {
        return $this->quantity;
    }

    public function setQuantity($quantity) {
        $this->quantity = $quantity;
        return $this;
    }
    public function getType() {
        return $this->type;
    }

    public function setType($type) {
        $this->type = $type;
        return $this;
    }
	public function getPrice() {
        return $this->pricefrequency;
    }

    public function setPrice($pricefrequency) {
        $this->pricefrequency = $pricefrequency;
        return $this;
    }
	public function getOwned() {
        return $this->ownedsecurableitem_id;
    }

    public function setOwned($ownedsecurableitem_id) {
        $this->ownedsecurableitem_id = $ownedsecurableitem_id;
        return $this;
    }
	public function getAccount() {
        return $this->account_id;
    }

    public function setAccount($account_id) {
        $this->account_id = $account_id;
        return $this;
	}
	  public function getContact() {
        return $this->contact_id;
    }

    public function setContact($contact_id) {
        $this->contact_id = $contact_id;
        return $this;
	}
	public function getOpportunity() {
        return $this->opportunity_id;
    }

    public function setOpportunity($opportunity_id) {
        $this->opportunity_id = $opportunity_id;
        return $this;
    }
	public function getProduct() {
        return $this->producttemplate_id;
    }

    public function setProduct($producttemplate_id) {
        $this->producttemplate_id = $producttemplate_id;
        return $this;
    }
	public function getStage() {
        return $this->stage_customfield_id;
    }

    public function setStage($stage_customfield_id) {
        $this->stage_customfield_id = $stage_customfield_id;
        return $this;
    }
	public function getSellprice() {
        return $this->sellprice_currencyvalue_id;
    }

    public function setSellprice($sellprice_currencyvalue_id) {
        $this->sellprice_currencyvalue_id = $sellprice_currencyvalue_id;
        return $this;
    }
}
?>